package com.example.testonlinedemo;
import android.os.Bundle;
import android.os.Handler;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.WindowManager;

public class MainActivity extends Activity {

	private static final int SPLASH_DISPLAY_TIME = 2000;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
		setContentView(R.layout.activity_main);
		
		new Handler().postDelayed(new Runnable() {
	        @Override
			public void run() {
	            Intent intent = new Intent(getApplicationContext(), home.class);
	            startActivity(intent);
	            finish();
	        }
	    }, SPLASH_DISPLAY_TIME);
	}
	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.main, menu);
		return true;
	}
	@Override
	protected void onDestroy() {
		super.onDestroy();
	}
}
